package com.woniuxy.dudugua.mapper;

import com.woniuxy.dudugua.entity.Product;
import com.woniuxy.dudugua.entity.ProductScan;
import com.woniuxy.dudugua.entity.ProductScanExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface ProductScanMapper {
    long countByExample(ProductScanExample example);

    int deleteByExample(ProductScanExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(ProductScan record);

    int insertSelective(ProductScan record);

    List<ProductScan> selectByExample(ProductScanExample example);

    ProductScan selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ProductScan record, @Param("example") ProductScanExample example);

    int updateByExample(@Param("record") ProductScan record, @Param("example") ProductScanExample example);

    int updateByPrimaryKeySelective(ProductScan record);

    int updateByPrimaryKey(ProductScan record);

    //轮播图
    List<ProductScan>  selectProductScanByTimes() throws  Exception;
    /**
     * 查询浏览记录的商品图片
     */
    List<ProductScan> selectScan(Integer userId);

    List<ProductScan> selectByProductId(Integer id);

    ProductScan selectScanById(Integer productId, Integer userId);

}